﻿using RFBR.DataAccess;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RFBR.Core.Infrastructure.Models.Structure
{
	internal class Slot : ISlot
	{
		#region [Private Members]
		private string _name;
		private InheritanceType _type;
		#endregion
		#region [Constructors]
		public Slot(string name = "Slot", InheritanceType inheritance = InheritanceType.Override)
		{
			_name = name;
			_type = inheritance;
		}
		#endregion
		#region [Properties]
		public string Name
		{
			get
			{
				if (!String.IsNullOrEmpty(_name))
				{
					return _name;
				}
				else
				{
					return Value.Name;
				}
			}
			set
			{
				_name = value;
			}
		}
		public IEntity Value { get; set; }
		public InheritanceType Inheritance
		{
			get
			{
				return _type;
			}
		}
		#endregion
		#region [Public methods]
		#endregion
	}
}
